package com.pingan.haofang.searchcloud.dashboard.dto;

import java.util.ArrayList;
import java.util.List;

/**
 * @author EX-SUNBIXIAO001
 * @date 2018/4/19
 * @since 1.0.0
 */
public class IndexBuildDto extends BasicMonitorDto implements Comparable<IndexBuildDto> {

    /**
     * 定时
     */

    private Integer cronSchduledNum = 0;

    private Integer cronSchduledSuccessNum = 0;

    private String cronSchduledProportion = "0";

    private boolean cronSchduledDangerFlag =false;
    /**
     * 手动
     */

    private Integer manualSchduledNum = 0;

    private Integer manualSchduledSuccessNum = 0;

    private String manualSchduledProportion = "0";

    private boolean manualSchduledDangerFlag =false;
    /**
     * 导入最大条数（全索引）
     */

    private Integer importMaxNum = 0;

    /**
     * 辅助计算总时间
     */

    private Integer importCostTimeTotal = 0;

    /**
     * 总次数
     */

    private Integer importCostFrequency = 0;

    /**
     * 总条数
     */

    private Integer importCostNumTotal = 0;

    /**
     * 平均时间
     */

    private Double importCostAverage = 0.0;

    /**
     * 平均速度
     */

    private Integer importSpeedAverage = 0;

    /**
     * 单数据源调用次数
     */

    private List<SingleDataBuildNumDto> singleDataBuildNumList = new ArrayList<>();

    private Integer singleDataBuildNumMax = 0;

    private String singleDataBuildStr;

    private String cron;

    //定时期望执行次数
    private Integer executeNumsExpect = 0;


    /**
     * cron未执行模板样式标记
     */
    private boolean cronExecutedDangerClassFlag =false;


    public boolean isCronSchduledDangerFlag() {
        return cronSchduledDangerFlag;
    }

    public void setCronSchduledDangerFlag(boolean cronSchduledDangerFlag) {
        this.cronSchduledDangerFlag = cronSchduledDangerFlag;
    }

    public boolean isManualSchduledDangerFlag() {
        return manualSchduledDangerFlag;
    }

    public void setManualSchduledDangerFlag(boolean manualSchduledDangerFlag) {
        this.manualSchduledDangerFlag = manualSchduledDangerFlag;
    }

    public boolean isCronExecutedDangerClassFlag() {
        return cronExecutedDangerClassFlag;
    }

    public void setCronExecutedDangerClassFlag(boolean cronExecutedDangerClassFlag) {
        this.cronExecutedDangerClassFlag = cronExecutedDangerClassFlag;
    }

    public Integer getCronSchduledNum() {
        return cronSchduledNum;
    }

    public void setCronSchduledNum(Integer cronSchduledNum) {
        this.cronSchduledNum = cronSchduledNum;
    }

    public Integer getCronSchduledSuccessNum() {
        return cronSchduledSuccessNum;
    }

    public void setCronSchduledSuccessNum(Integer cronSchduledSuccessNum) {
        this.cronSchduledSuccessNum = cronSchduledSuccessNum;
    }

    public String getCronSchduledProportion() {
        return cronSchduledProportion;
    }

    public void setCronSchduledProportion(String cronSchduledProportion) {
        this.cronSchduledProportion = cronSchduledProportion;
    }

    public Integer getManualSchduledNum() {
        return manualSchduledNum;
    }

    public void setManualSchduledNum(Integer manualSchduledNum) {
        this.manualSchduledNum = manualSchduledNum;
    }

    public Integer getManualSchduledSuccessNum() {
        return manualSchduledSuccessNum;
    }

    public void setManualSchduledSuccessNum(Integer manualSchduledSuccessNum) {
        this.manualSchduledSuccessNum = manualSchduledSuccessNum;
    }

    public String getManualSchduledProportion() {
        return manualSchduledProportion;
    }

    public void setManualSchduledProportion(String manualSchduledProportion) {
        this.manualSchduledProportion = manualSchduledProportion;
    }

    public Integer getImportMaxNum() {
        return importMaxNum;
    }

    public void setImportMaxNum(Integer importMaxNum) {
        this.importMaxNum = importMaxNum;
    }

    public Integer getImportCostTimeTotal() {
        return importCostTimeTotal;
    }

    public void setImportCostTimeTotal(Integer importCostTimeTotal) {
        this.importCostTimeTotal = importCostTimeTotal;
    }

    public Integer getImportCostFrequency() {
        return importCostFrequency;
    }

    public void setImportCostFrequency(Integer importCostFrequency) {
        this.importCostFrequency = importCostFrequency;
    }

    public Integer getImportCostNumTotal() {
        return importCostNumTotal;
    }

    public void setImportCostNumTotal(Integer importCostNumTotal) {
        this.importCostNumTotal = importCostNumTotal;
    }

    public Double getImportCostAverage() {
        return importCostAverage;
    }

    public void setImportCostAverage(Double importCostAverage) {
        this.importCostAverage = importCostAverage;
    }

    public Integer getImportSpeedAverage() {
        return importSpeedAverage;
    }

    public void setImportSpeedAverage(Integer importSpeedAverage) {
        this.importSpeedAverage = importSpeedAverage;
    }

    public List<SingleDataBuildNumDto> getSingleDataBuildNumList() {
        return singleDataBuildNumList;
    }

    public void setSingleDataBuildNumList(List<SingleDataBuildNumDto> singleDataBuildNumList) {
        this.singleDataBuildNumList = singleDataBuildNumList;
    }

    public Integer getSingleDataBuildNumMax() {
        return singleDataBuildNumMax;
    }

    public void setSingleDataBuildNumMax(Integer singleDataBuildNumMax) {
        this.singleDataBuildNumMax = singleDataBuildNumMax;
    }

    public String getSingleDataBuildStr() {
        return singleDataBuildStr;
    }

    public void setSingleDataBuildStr(String singleDataBuildStr) {
        this.singleDataBuildStr = singleDataBuildStr;
    }

    public String getCron() {
        return cron;
    }

    public void setCron(String cron) {
        this.cron = cron;
    }

    public Integer getExecuteNumsExpect() {
        return executeNumsExpect;
    }

    public void setExecuteNumsExpect(Integer executeNumsExpect) {
        this.executeNumsExpect = executeNumsExpect;
    }



    @Override
    public int compareTo(IndexBuildDto o) {

        return o.getImportCostFrequency() - this.getImportCostFrequency();

    }
}
